package service.impl;

import bean.UserAddress;
import service.UserService;

import java.util.Arrays;
import java.util.List;

public class UserServiceImpl implements UserService {
    public UserAddress getUserAddress(String userId) {
        UserAddress a1=new UserAddress(1,"南京xml","001","139");
        UserAddress a2=new UserAddress(2,"北京xml","002","136");
        List<UserAddress>list= Arrays.asList(a1,a2);
        for(int i=0;i<list.size();i++){
            if(list.get(i).getUserId().equals(userId)){
                return list.get(i);
            }
        }
        return null;
    }
}
